% Numerical Computation of Surrogate Model Expression
% It is noted that the sequence of 'Coefficient_Set' need to be in accordance with the sequence of 'Degree_Nd_Set'.
% Meanwhile, the interval [a,b] should be converted to the interval [-1,1].
function Polynomial_Array = Design_Matrix_Func(Coefficient_Set,Degree_Nd_Set,a,b,x0,x1,x2,y0,y1,y2)
    
	Polynomial_Array = zeros(size(Coefficient_Set'));
	x0Hat = (2*x0-a-b)/(b-a);														% xHat: x^[-1,1]
	x1Hat = (2*x1-a-b)/(b-a);														% xHat: x^[-1,1]
	x2Hat = (2*x2-a-b)/(b-a);														% xHat: x^[-1,1]	
	y0Hat = (2*y0-a-b)/(b-a);														% yHat: y^[-1,1]
	y1Hat = (2*y1-a-b)/(b-a);														% xHat: x^[-1,1]
	y2Hat = (2*y2-a-b)/(b-a);														% xHat: x^[-1,1]	
	for index = 1 : size(Degree_Nd_Set,1)
		Polynomial_Array(index) = Numerical_Chebyshev_Polynomial(Degree_Nd_Set(index,1)-1,x0Hat)*...
			                      Numerical_Chebyshev_Polynomial(Degree_Nd_Set(index,2)-1,x1Hat)*...
								  Numerical_Chebyshev_Polynomial(Degree_Nd_Set(index,3)-1,x2Hat)*...
								  Numerical_Chebyshev_Polynomial(Degree_Nd_Set(index,4)-1,y0Hat)*...
			                      Numerical_Chebyshev_Polynomial(Degree_Nd_Set(index,5)-1,y1Hat)*...
			                      Numerical_Chebyshev_Polynomial(Degree_Nd_Set(index,6)-1,y2Hat);
	end
	
end